cmake_minimum_required(VERSION 3.1.2)
project(ros_udp_bridge)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  sensor_msgs
  message_generation
  cv_bridge
)

add_message_files(
  FILES
  A8_attitude.msg
)


generate_messages(
  DEPENDENCIES
  std_msgs
  sensor_msgs
)


#opencv库函数引用
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})  
link_directories(${OpenCV_LIBRARY_DIRS})  



catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES a8_yuntai
  CATKIN_DEPENDS roscpp rospy std_msgs message_runtime
#  DEPENDS system_lib
)



include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

add_library(ros_udp_lib
    src/ros_udp.cpp
    )

target_link_libraries(ros_udp_lib ${OpenCV_LIBS})


add_executable(${PROJECT_NAME}_node src/main_node.cpp)
target_link_libraries(${PROJECT_NAME}_node 
ros_udp_lib
    ${catkin_LIBRARIES}
    ${OpenCV_LIBS}) 
